package day3;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class EnumTest {
    public static void main(String[] args) {
        System.out.println(Sex.人妖);
        Sex nan=Sex.男;
        System.out.println(nan.name());
        System.out.println(nan.ordinal());
        Scanner in=new Scanner(System.in);
        Student student=new Student();
        System.out.println("input name:");
        student.setName(in.next());
        System.out.println("input age:");
        student.setAge(in.nextInt());
        System.out.println("请输入性别：");
        student.setSex(Sex.valueOf(in.next()));
        System.out.println(student);
    }
}
